window.onload = function () {
	document.getElementById("inputPassword").onchange = validatePassword;
	document.getElementById("inputPassword2").onchange = validatePassword;
}

function validatePassword(){
	var pass2=document.getElementById("inputPassword2").value;
	var pass1=document.getElementById("inputPassword").value;
	if(pass1!=pass2)
		document.getElementById("inputPassword2").setCustomValidity("Passwords Don't Match");
	else
		document.getElementById("inputPassword2").setCustomValidity('');
}
